/**
 * 监听localstorage 改变的react hook
 */


function useLocalStorage(){
  const [value, setValue] = useState(localStorage.getItem(localStorageKey))
  useEffect(() => {
    localStorage.setItem(localStorageKey, value)
  }, [value])
  return [value, setValue]
}